import cml from 'chameleon-api'
export default {
    listIndex(ctx, data) {
        ctx.commit('show',true)
        //console.log('action')
        cml.get({
            url: '/korean/grammer/list',
            setting: {
              apiPrefix:true,
              credentials:'omit'
            },
            data
          }).then(res => {
            ctx.commit('show',false)
            ctx.commit('listIndex',res.data.content)
          }, err => {
            cml.showToast({
              message: "访问异常",
              duration: 1000
            })
          })
            
        

    },
    login(ctx, data) {
      cml.redirectTo({
        path:'/pages/tab/tab'
      })
      ctx.commit('isLogin',true)
    }
}
